//格式化Json时间
function formateJsonDate(JSONDateString) {
    var date = new Date(parseInt(JSONDateString));
    var year = date.getFullYear();
    var month = date.getMonth + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
    var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
    var hour = date.getHours();
    var minute = date.getMinutes();
    var second = date.getSeconds();
    var datastr = year + "-" + month + "-" + currentDate + " " + hour + ":" + minute + ":" + second;
    return datastr;
}

//根据url获取参数
function getParamter(param){
    var result;
    var path = window.location.href;
    var params = path.split("?")[1];
    if(typeof(params) != "undefined"){
       var arr = params.split("&");
       for(var i=0;i<arr.length;i++){
            if(arr[i].split("=")[0]==param){
                result = arr[i].split("=")[1];
            }
       }
    }
    if(typeof(result) == "undefined"){
        result="";
    }
    return result;
}

